<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>中国社区</title>
  <link rel="stylesheet" href="../../css/management/dividendManagement.css">
  <link rel="stylesheet" href="../../css/management/managementTabs.css">
  <link rel="stylesheet" href="../../css/public/base.css">
  <link rel="stylesheet" href="../../layui/css/layui.css">
  <script src="../../js/public/jquery-3.3.1.js"></script>
  <script src="../../js/management/management.js"></script>
</head>
<body>
<div class="managementTabs">
  <div class="mt-left">
    <ul>
      <li><span class="circle"></span><a href="../management/fundTransfer.html"></a>资金划拨</li>
      <li class="cur"><span class="circle"></span><a href="../management/dividendManagement.html"></a>分红管理</li>
      <li><span class="circle"></span><a href="../management/deliveryManagement.html"></a>提货管理</li>
      <li><span class="circle"></span><a href="../management/openList.html"></a>建仓列表</li>
      <li><span class="circle"></span><a href="../management/reinvestList.html"></a>复投列表</li>
      <li><span class="circle"></span><a href="../management/withdrawList.html"></a>提现列表</li>
      <li><span class="circle"></span><a href="../management/rechargeList.html"></a>充值列表</li>
      <li><span class="circle"></span><a href="../management/manualRecharge.html"></a>手动充值</li>
      <li><span class="circle"></span><a href="../management/priceManagement.html"></a>RST价格管理</li>
    </ul>
  </div>
  <div class="dividendManagement">
    <div class="operating">
      <div class="layui-form">
        <span>状态</span>
        <div style="display:inline-block;width: 196px;margin-left: 20px;margin-right: 40px;">
          <select name="condition" lay-filter="condition">
            <option value="">请选择</option>
            <option value="0">驳回</option>
            <option value="1">待划拨</option>
            <option value="2">已划拨</option>
          </select>
        </div>
      </div>
      <div>
        <span>账号</span>
        <input type="text" placeholder="请输入...">
      </div>
      <div>
        <span>统计时间</span>
        <input type="text" class="layui-input" id="countTime" placeholder="请输入...">
      </div>
      <div>
        <span>划拨时间</span>
        <input type="text" class="layui-input" id="transferTime" placeholder="请输入...">
      </div>
      <div>
        <div class="searchBtn">查询</div>
        <div class="resetBtn">重置</div>
        <div class="exportBtn">导出</div>
      </div>
    </div>
    <div class="operateBtn">
      <div class="batchPass">
        <div class="passBtn">批量通过</div>
        <div class="rejectPBtn">批量驳回</div>
      </div>
      <div class="batchTransfer" style="display: none;">
        <div class="transferBtn">批量划拨</div>
        <div class="rejectTBtn">批量驳回</div>
      </div>
    </div>
    <div class="rl-table">
      <table class="layui-hide" id="test" lay-filter="test"></table>
    </div>
  </div>
</div>
<script src="../../layui/layui.js"></script>
<script type="text/html" id="barDemo">
  <a style="color:#2d528f;margin-right: 30px;" lay-event="detail">划拨</a>
  <a style="color:#ff0000;" lay-event="del">驳回</a>
</script>
<script>
  $("#nav").height($(window).height());
  $(window).resize(function () {
    $("#nav").height($(window).height());
  });
  layui.use('table', function () {
    var table = layui.table;
    layui.use('table', function () {
      var table = layui.table;
      table.render({
        elem: '#test'
//      , url: '/demo/table/user/'
//        , skin: 'nob'
        , width: '100%'
//        ,limits:[5,10,20,50]
        , cols: [[
          {type: 'checkbox'}
          , {field: 'id', title: 'ID'}
          , {field: 'accountNum', title: '账号', minWidth: 100}
          , {field: 'accessPerson', title: '获取人', minWidth: 80}
          , {field: 'phone', title: '手机号', minWidth: 115}
          , {field: 'licenseNum', title: '证件号', minWidth: 160}
          , {field: 'bonusAmount', title: '奖金金额', minWidth: 100}
          , {field: 'dividendLevel', title: '分红等级', minWidth: 100}
          , {field: 'dividendTime', title: '分红时间', minWidth: 170, sort: true}
          , {field: 'transferTime', title: '划拨时间', minWidth: 170, sort: true}
          , {field: 'status', title: '状态', minWidth: 80}
          , {field: 'operate', title: '操作', minWidth: 130, toolbar: '#barDemo', fixed: 'right'}
        ]]
        , data: [{
          "id": "01"
          , "accountNum": 12345678
          , "accessPerson": "张三"
          , "phone": "12345611789"
          , "licenseNum": "111111111111111112"
          , "bonusAmount": "100.00"
          , "dividendLevel": "PR"
          , "dividendTime": "2018.01.01 18:00:00"
          , "transferTime": "2018.01.01 18:00:00"
          , "status": "待划拨"
        }, {
          "id": "01"
          , "accountNum": 12345678
          , "accessPerson": "张三"
          , "phone": "123456789"
          , "licenseNum": "320***001"
          , "bonusAmount": "100.00"
          , "dividendLevel": "PR"
          , "dividendTime": "2018.01.01 18:00:00"
          , "transferTime": "2018.01.01 18:00:00"
          , "status": "待划拨"
        }, {
          "id": "01"
          , "accountNum": 12345678
          , "accessPerson": "张三"
          , "phone": "123456789"
          , "licenseNum": "320***001"
          , "bonusAmount": "100.00"
          , "dividendLevel": "PR"
          , "dividendTime": "2018.01.01 18:00:00"
          , "transferTime": "2018.01.01 18:00:00"
          , "status": "待划拨"
        }, {
          "id": "01"
          , "accountNum": 12345678
          , "accessPerson": "张三"
          , "phone": "123456789"
          , "licenseNum": "320***001"
          , "bonusAmount": "100.00"
          , "dividendLevel": "PR"
          , "dividendTime": "2018.01.01 18:00:00"
          , "transferTime": "2018.01.01 18:00:00"
          , "status": "待划拨"
        }, {
          "id": "01"
          , "accountNum": 12345678
          , "accessPerson": "张三"
          , "phone": "123456789"
          , "licenseNum": "320***001"
          , "bonusAmount": "100.00"
          , "dividendLevel": "PR"
          , "dividendTime": "2018.01.01 18:00:00"
          , "transferTime": "2018.01.01 18:00:00"
          , "status": "待划拨"
        }, {
          "id": "01"
          , "accountNum": 12345678
          , "accessPerson": "张三"
          , "phone": "123456789"
          , "licenseNum": "320***001"
          , "bonusAmount": "100.00"
          , "dividendLevel": "PR"
          , "dividendTime": "2018.01.01 18:00:00"
          , "transferTime": "2018.01.01 18:00:00"
          , "status": "待划拨"
        }, {
          "id": "01"
          , "accountNum": 12345678
          , "accessPerson": "张三"
          , "phone": "123456789"
          , "licenseNum": "320***001"
          , "bonusAmount": "100.00"
          , "dividendLevel": "PR"
          , "dividendTime": "2018.01.01 18:00:00"
          , "transferTime": "2018.01.01 18:00:00"
          , "status": "待划拨"
        }, {
          "id": "01"
          , "accountNum": 12345678
          , "accessPerson": "张三"
          , "phone": "123456789"
          , "licenseNum": "320***001"
          , "bonusAmount": "100.00"
          , "dividendLevel": "PR"
          , "dividendTime": "2018.01.01 18:00:00"
          , "transferTime": "2018.01.01 18:00:00"
          , "status": "待划拨"
        }, {
          "id": "01"
          , "accountNum": 12345678
          , "accessPerson": "张三"
          , "phone": "123456789"
          , "licenseNum": "320***001"
          , "bonusAmount": "100.00"
          , "dividendLevel": "PR"
          , "dividendTime": "2018.01.01 18:00:00"
          , "transferTime": "2018.01.01 18:00:00"
          , "status": "待划拨"
        }, {
          "id": "01"
          , "accountNum": 12345678
          , "accessPerson": "张三"
          , "phone": "123456789"
          , "licenseNum": "320***001"
          , "bonusAmount": "100.00"
          , "dividendLevel": "PR"
          , "dividendTime": "2018.01.01 18:00:00"
          , "transferTime": "2018.01.01 18:00:00"
          , "status": "待划拨"
        }, {
          "id": "01"
          , "accountNum": 12345678
          , "accessPerson": "张三"
          , "phone": "123456789"
          , "licenseNum": "320***001"
          , "bonusAmount": "100.00"
          , "dividendLevel": "PR"
          , "dividendTime": "2018.01.01 18:00:00"
          , "transferTime": "2018.01.01 18:00:00"
          , "status": "待划拨"
        }]
        , page: true
      });
    });
    table.on('tool(test)', function (obj) {
      var data = obj.data;
      if (obj.event === 'detail') {
        layer.open({
          type: 0
          , id: 'transfer' //防止重复弹出
          , area: ['400px !important', '220px !important']
          , title: "信息"
          , content: '<p style="font-size: 16px;height: 40px;line-height: 40px">确认划拨?</p>'
          , btn: ['确定', '取消']
          , btnAlign: 'r' //按钮居中
          ,shade: 0
          //,shadeClose: true
          , move: false
          , resize: false
          , yes: function () {
            layer.closeAll();
            layer.msg("划拨成功")
          }
          , btn2: function () {
            layer.closeAll();
          }
        });
      } else if (obj.event === 'del') {
        layer.open({
          type: 0
          , id: 'turnDown' //防止重复弹出
          , area: ['400px !important', '220px !important']
          , title: "信息"
          , content: '<p style="font-size: 16px;height: 40px;line-height: 40px">确认驳回(驳回后不能再取消驳回)?</p>'
          , btn: ['确定', '取消']
          , btnAlign: 'r' //按钮对齐方式
          ,shade: 0
          //,shadeClose: true
          , move: false
          , resize: false
          , yes: function () {
            layer.closeAll();
            layer.msg("成功驳回")
          }
          , btn2: function () {
            layer.closeAll();
          }
        });
        /*layer.confirm('真的删除行么', function(index){
          obj.del();
          layer.close(index);
        });*/
      }
    });
  });
  layui.use('laydate', function () {
    var laydate = layui.laydate;
    laydate.render({
      elem: '#countTime'
      , type: 'datetime'
      , theme: '#2d528f'
      , range: true
    });
    laydate.render({
      elem: '#transferTime'
      , type: 'datetime'
      , theme: '#2d528f'
      , range: true
    });
  });
</script>
</body>
</html>